#ifndef _LOCKER_H_
#define _LOCKER_H_





namespace sd
{
namespace tools
{


template< class T >
class locker
{
public:
	locker( T& obj ):obj_(obj){ obj.lock(); }
	template<typename TParam>
	locker( T& obj, const TParam& param ):obj_(obj){ obj.lock(param); }
	~locker(){ obj_.unlock(); }
private:
	T& obj_;
};




}//tools
}//sd









#endif//_LOCKER_H_